This invention relates generally to computer storage device configuration, and more particularly to the management of dynamic partitions on a disk storage device.
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. The following notice applies to the software and data as described below and in the drawing hereto: Copyright(copyright)1997, Microsoft Corporation, All Rights Reserved.
When a computer boots, the operating system recognizes the physical storage devices present in the computer. Before a fixed-disk storage device can be used, the disk must be formatted by creating logical partitions which correspond to physical locations on the device. The physical address of the beginning and ending of each logical partition on a disk are stored in an area on the disk that is managed by the operating system or a file system component. One partition is created that represents the entire disk.
Each partition is given a device name that is used to address the data in the partition. The partition that represents the entire disk and permits I/O access to all the data on the disk is frequently called xe2x80x9cpartition 0.xe2x80x9d The partitions representing sub-divisions of the disk are usually numbered starting with xe2x80x9c1.xe2x80x9d Because there can be more than one fixed disk in a system, each partition is uniquely identified based on the position of the partition in a device hierarchy so partition0 on the first hard disk in a computer is named xe2x80x9c/device/harddisk0/partition0,xe2x80x9d partition1 on the first hard disk is named xe2x80x9c/device/harddisk0/partition1,xe2x80x9d etc. The unique device names of all the partitions in a computer are stored in a xe2x80x9cdisk stackxe2x80x9d which is managed by the operating system or the file system component.
In order to enable higher layers of the operating system and user applications to access data, an operating system must create logical volumes from the partitions. The component of an operating system that creates and manages the logical volumes is often referred to as a volume manager. Typically, a volume manager works only with partitions that represent sub-divisions of a disk to create logical volumes from one or more partitions, or multiple logical volumes from a single partition.
The operating system creates an internal logical representation of each of the partitions and logical volumes in the system. The logical representations can be tables or data bases entries. In an object-based operating system such as the MICROSOFT WINDOWS NT(copyright) operating system family, the internal logical representation of a partition is a partition device object. For a logical volume created from a set of multiple partitions, the partition device object for the first partition in the set is used to represent all the partitions in the logical volume. The remaining partition device objects in the set were not individually addressable so that I/O requests directed to one of the other partition device objects fail.
The existing methods for creating and addressing logical volumes spanning multiple partitions have major drawbacks. For example, logical volumes are frequently created from a set of partitions to enable the xe2x80x9cstripingxe2x80x9d of the data across all the partitions as a fail-safe mechanism. When a partition in the set fails, the data on the failed partition is recreated on the remaining partitions in the set. However, if the failed partition is the first partition in the set, the logical volume continues to be addressed using the name of the partition device object of the first partition. Therefore, such partition device objects must be maintained within the system even though the corresponding partition is no longer available or the data cannot be accessed without modifying the software that references the objects.
Furthermore, as operating systems are enhanced to allow dynamic changes in the physical configuration of a computer during a boot session, devices can be introduced and then removed without rebooting the system. In current operating systems, the partition device objects created when the device was introduced cannot be deleted when the device is removed.
Therefore, there is a need in the art for an operating system that supports dynamic changes in the characteristics of physical devices underlying logical volumes without requiring that the higher layers of the operating system and user applications modify the addresses of the logical volumes.
The above-mentioned shortcomings, disadvantages and problems are addressed by the present invention, which will be understood by reading and studying the following specification.
A partition manager enables the dynamic creation, reconfiguration, and deletion of logical volumes as non-removable storage devices are introduced, reconfigured, or deleted in a computer system by assigning partitions on a storage device to volume managers which create the volumes, and by removing the assignment when partitions are inaccessible by the system due to the deletion or reconfiguration of the device.
The partition manager receives notification from the operating system of the arrival of new volume managers in a system. When new partitions are enumerated on a storage device by a device driver, the partition manager intercepts the partitions before they can be registered with the operating system. The partition manager queries each volume manager, in order of their arrival in the system, as to whether the volume manager handles a particular partition and assigns control of the partition to the appropriate volume manager. Each volume manager enumerates logical volumes from a partition or a combination of partitions.
When a storage device is being reconfigured, deleted or modified partitions are removed from the system. The operating system notifies the partition manager of the partitions affected by the reconfiguration and the partition manager determines what volume manager(s) manage the affected partitions. The partition manager notifies the appropriate volume managers and removes the affected partitions from the control of the volume managers. When partitions becomes unavailable to the system because the underlying device is deleted from the system, the partition manager determines the volume managers that manage the unavailable partitions, queries the volume managers for the logical volumes that are dependent on the unavailable partitions, and informs the operating system of the volume dependencies. When the device is disconnected from the system, the partition manager removes the unavailable partitions from the control of the volume managers.
The present application describes computer systems, methods, and computer-readable media of varying scope. The partition manager is variously described as causing the processor of a computer to perform certain actions, as a series of instructions executed from a computer-readable medium, and in terms of its interaction with objects and other system components in an object-based operating system. An in-memory data structure to store the associations between the partitions and the volume manager is also described.
The level of indirection introduced by the partition manager permits flexibility in addressing logical volumes regardless of the underlying partitions that comprise the logical volume. Thus, the physical characteristics of a logical volume can change dynamically without the necessity of modifying the higher layers of the operating system and the user applications that reference the logical volume. Furthermore, because the partition manager manages the interface between partition objects and an object-based operating system, partition objects can be deleted when the corresponding partition fails or is removed.
The present invention describes systems, clients, servers, methods, and computer-readable media of varying scope. In addition to the aspects and advantages of the present invention described in this summary, further aspects and advantages of the invention will become apparent by reference to the drawings and by reading the detailed description that follows.